package mud.events;

import mud.Exit;
import mud.Interactable;

/** Indicates that an entity has left a room */
public class ExitEvent extends EntityEvent {

    /** the exit that was taken */
    private final Exit exit;

    /**
     * Constructor
     * @param source the unit that moved 
     * @param exit the exit that was taken
     */
    public ExitEvent(Interactable source, Exit exit) {
        super(source);
        this.exit = exit;
    }

    /**
     * @return the exit that was taken
     */
    public Exit getExit() {
        return exit;
    }
}
